﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using Digitalmes.Model.WmsManagement;
using Digitalmes.Model;

namespace Digitalmes.ViewModel.WmsManagement.OutboundVMs
{
    public partial class OutboundTemplateVM : BaseTemplateVM
    {
        
        [Display(Name = "_Model._Outbound._Material")]
        public ExcelPropety Material_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.MaterialId);
        [Display(Name = "_Model._Outbound._Wo")]
        public ExcelPropety Wo_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.Wo);
        [Display(Name = "_Model._Outbound._Sn")]
        public ExcelPropety Sn_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.Sn);
        [Display(Name = "_Model._Outbound._OutQty")]
        public ExcelPropety OutQty_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.OutQty);
        [Display(Name = "_Model._Outbound._OutMode")]
        public ExcelPropety OutMode_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.OutMode);
        [Display(Name = "_Model._Outbound._StoreQty")]
        public ExcelPropety StoreQty_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.StoreQty);
        [Display(Name = "_Model._Outbound._SheetId")]
        public ExcelPropety SheetId_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.SheetId);
        [Display(Name = "_Model._Outbound._SheetNo")]
        public ExcelPropety SheetNo_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.SheetNo);
        [Display(Name = "_Model._Outbound._OutOperator")]
        public ExcelPropety OutOperator_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.OutOperator);
        [Display(Name = "_Model._Outbound._OutboundDate")]
        public ExcelPropety OutboundDate_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.OutboundDate, true);
        [Display(Name = "_Model._Outbound._IsValid")]
        public ExcelPropety IsValid_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.IsValid);
        [Display(Name = "_Model._Outbound._TenantCode")]
        public ExcelPropety TenantCode_Excel = ExcelPropety.CreateProperty<Outbound>(x => x.TenantCode);

	    protected override void InitVM()
        {
            
            Material_Excel.DataType = ColumnDataType.ComboBox;
            Material_Excel.ListItems = DC.Set<MaterialDoc>().GetSelectListItems(Wtm, y => y.TenantCode.ToString());

        }

    }

    public class OutboundImportVM : BaseImportVM<OutboundTemplateVM, Outbound>
    {
            //import

    }

}